﻿<html>
<head>
    <title>Tree - jQuery MiniUI 3.0 Documentation</title>    

    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta name="keywords" content="jquery,datagrid,grid,表格控件,ajax,web开发,java开发,.net开发,tree,table,treegrid" />
    <meta name="description" content="jQuery MiniUI - 专业WebUI控件库。jQuery MiniUI是使用Javascript实现的前端Ajax组件库，支持所有浏览器，可以跨平台开发，如Java、.Net、PHP等。" />

    <link href="css/common.css" rel="stylesheet" type="text/css" />
    <script src="core.js" type="text/javascript"></script>
    



    
</head>
<body>
    <h3>mini.Tree</h3>
    
    <p>树形控件。</p>

    
    
    <h4>Extend</h4>
    <p> <a class="extendlink" href="datagrid.html">mini.DataGrid</a></p>    

    <h4>Usage</h4>
<pre class="code"><span style="color:blue">&lt;</span><span style="color:maroon">ul </span><span style="color:red">id</span><span style="color:blue">="tree1" </span><span style="color:red">class</span><span style="color:blue">="mini-tree" </span><span style="color:red">url</span><span style="color:blue">="../data/tree.txt" </span><span style="color:red">style</span><span style="color:blue">="</span><span style="color:red">width</span><span style="color:blue">:300px;</span><span style="color:red">padding</span><span style="color:blue">:5px;" 
    </span><span style="color:red">showTreeIcon</span><span style="color:blue">="true" </span><span style="color:red">textField</span><span style="color:blue">="text" </span><span style="color:red">idField</span><span style="color:blue">="id" &gt;        
&lt;/</span><span style="color:maroon">ul</span><span style="color:blue">&gt;
</span></pre>

    <h4>Screenshots</h4>
    <img src="images/tree.gif" />

    <h4>Examples</h4>
	<a class="demo" href="../../demo/tree/tree.html" target="_blank">Base Example</a>
    <a class="demo" href="../../demo/tree/createtree.html" target="_blank">Create Tree</a>
    <a class="demo" href="../../demo/tree/lazytree.html" target="_blank">Lazy Tree</a>
    <a class="demo" href="../../demo/tree/navtree.html" target="_blank">Navigation Tree</a>
    <a class="demo" href="../../demo/tree/selection.html" target="_blank">Selection</a>
    <a class="demo" href="../../demo/tree/contextmenu.html" target="_blank">ContextMenu</a><br />
    <a class="demo" href="../../demo/tree/actiontree.html" target="_blank">Add/Remove/Update Node</a>
    <a class="demo" href="../../demo/tree/collapsetree.html" target="_blank">Expand/Collapse</a>				            
    <a class="demo" href="../../demo/tree/drawnode.html" target="_blank">Draw Node</a>
    <!--<a class="demo" href="../../demo/tree/dragdrop.html" target="_blank">DragDrop Node</a>-->
    <a class="demo" href="../../demo/tree/movenode.html" target="_blank">MoveNode Window</a>

    <h4>Properties</h4>
    <table>
        <tr><th>Name</th><th>Type</th><th>Description</th><th>Default</th><th><a href="setsupport.html" target="_blank" style="padding-left:5px;padding-right:5px;"> Set? </a></th><th><a href="getsupport.html" target="_blank" style="padding-left:5px;padding-right:5px;"> Get? </a></th><th><a href="tagsupport.html" target="_blank" style="padding-left:5px;padding-right:5px;"> Tag? </a></th></tr>
        <tr>
            <td>data</td>
            <td>Array</td>
            <td>树形数据对象</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>   
        <tr>
            <td>url</td>
            <td>String</td>
            <td>数据加载地址</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>         
        <tr>
            <td>ajaxType</td>
            <td>String</td>
            <td>ajax类型：get/post。</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>ajaxOptions</td>
            <td>Object</td>
            <td>ajax配置对象。如：ajaxOptions="{type:'post', async: true, data: {a:1, b: true}, dataType: 'text', contentType: 'application/x-www-form-urlencoded;charset=utf-8'}"。</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>value</td>
            <td>String</td>
            <td>选中的节点值</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>idField</td>
            <td>String</td>
            <td>值字段。</td>
            <td>id</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        
        <tr>
            <td>textField</td>
            <td>String</td>
            <td>节点文本字段</td>
            <td>text</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        <tr>
            <td>iconField</td>
            <td>String</td>
            <td>图标字段</td>
            <td>iconCls</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>nodesField</td>
            <td>String</td>
            <td>子级节点字段</td>
            <td>children</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>parentField</td>
            <td>String</td>
            <td>父节点字段</td>
            <td>pid</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>imgField</td>
            <td>String</td>
            <td>节点图片字段。</td>
            <td>img</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>imgPath</td>
            <td>String</td>
            <td>节点图片路径。节点可以设置"img"属性。</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>resultAsTree</td>
            <td>Boolean</td>
            <td>url数据是否列表</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>dataField</td>
            <td>String</td>
            <td>数据列表字段</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>checkedField</td>
            <td>String</td>
            <td>checked字段</td>
            <td>checked</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>checkRecursive</td>
            <td>Boolean</td>
            <td>是否联动选择父子节点。比如选中父节点，自动全选子节点。</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>autoCheckParent</td>
            <td>Boolean</td>
            <td>是否自动选择父节点。比如选中子节点，将父节点也自动选中。</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        
        <tr>
            <td>expandOnLoad</td>
            <td>Boolean/Number</td>
            <td>加载后是否展开。比如：true展开所有节点；0展开第一级节点。以此类推。</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        <tr>
            <td>showTreeIcon</td>
            <td>Boolean</td>
            <td>显示节点图标</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        <tr>
            <td>showTreeLines</td>
            <td>Boolean</td>
            <td>显示树形线条</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 

        <tr>
            <td>allowSelect</td>
            <td>Boolean</td>
            <td>允许选择节点</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        <tr>
            <td>showCheckBox</td>
            <td>Boolean</td>
            <td>允许Check模式选中节点</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        <tr>
            <td>checkOnTextClick</td>
            <td>Boolean</td>
            <td>点击节点文本切换选择checkbox</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        
        <tr>
            <td>showFolderCheckBox</td>
            <td>Boolean</td>
            <td>当showCheckBox为true时，是否显示父节点CheckBox</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        
        <tr>
            <td>showExpandButtons</td>
            <td>Boolean</td>
            <td>显示折叠展开图标</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr> 
        <tr>
            <td>enableHotTrack</td>
            <td>Boolean</td>
            <td>移动节点上时高亮显示</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>expandOnDblClick</td>
            <td>Boolean</td>
            <td>双击节点展开收缩</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>expandOnNodeClick</td>
            <td>Boolean</td>
            <td>单击节点展开收缩</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        
<!--        <tr>
            <td>removeOnCollapse</td>
            <td>Boolean</td>
            <td>收缩节点被删除。极大提升性能。</td>
            <td>true</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>-->
 
        <tr>
            <td>allowLeafDropIn</td>
            <td>Boolean</td>
            <td>是否允许拖拽投放到子节点内</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>allowDrag</td>
            <td>Boolean</td>
            <td>是否允许拖拽节点</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>allowDrop</td>
            <td>Boolean</td>
            <td>是否允许投放节点</td>
            <td>false</td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
<!--        <tr>
            <td>dragGroupName</td>
            <td>String</td>
            <td>拖拽组名</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>
        <tr>
            <td>dropGroupName</td>
            <td>String</td>
            <td>投放组名</td>
            <td></td>
            <td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td><td style="text-align:center;">&radic;</td>
        </tr>-->
    </table>

    <h4>Methods</h4>
    <table>
        <tr><th>Name</th><th>Parameter</th><th>Description</th><th>Return</th></tr>

        <tr>
            <td>load ( url )</td>
            <td>
            </td>
            <td>加载数据。<br />
            </td>
            <td></td>
        </tr>
        <tr>
            <td>loadData ( Array )</td>
            <td>
            </td>
            <td>加载树形数据。<br />
            </td>
            <td></td>
        </tr>
        <tr>
            <td>loadList ( Array, idField, parentField )</td>
            <td>
            </td>
            <td>加载列表数据。比如：tree.loadList(list, "id", "pid")<br />
            </td>
            <td></td>
        </tr>
        <tr>
            <td>getList ( )</td>
            <td></td>
            <td>获取节点数组。
            </td>
            <td>Array</td>
        </tr>
        <tr>
            <td>isChanged ( )</td>
            <td></td>
            <td>是否已修改。</td>
            <td>Boolean</td>
        </tr>
        <tr>
            <td>accept ( )</td>
            <td></td>
            <td>清除所有行修改痕迹。</td>
            <td></td>
        </tr>
        <tr>
            <td>loadNode ( node )</td>
            <td>
            </td>
            <td>懒加载节点下一级数据。<br />
            </td>
            <td></td>
        </tr>
        <tr>
            <td>getRootNode ( )</td>
            <td></td>
            <td>获取根节点。</td>
            <td>Object</td>
        </tr>
        
        <tr>
            <td>getAncestors ( node )</td>
            <td></td>
            <td>获得所有父节点</td>
            <td>Array</td>
        </tr>
        <tr>
            <td>getParentNode ( node )</td>
            <td></td>
            <td>获得父节点</td>
            <td>Object</td>
        </tr>
        <tr>
            <td>getChildNodes ( node )</td>
            <td></td>
            <td>获得子节点集合。</td>
            <td>Array</td>
        </tr>
        <tr>
            <td>getAllChildNodes ( node )</td>
            <td></td>
            <td>获得所有子节点集合。</td>
            <td>Array</td>
        </tr>
        
        <tr>
            <td>isAncestor ( pnode, node )</td>
            <td></td>
            <td>pnode是否是node的父级节点。</td>
            <td>Boolean</td>
        </tr>
        
        <tr>
            <td>isLeaf ( node )</td>
            <td></td>
            <td>是否叶子节点。</td>
            <td></td>
        </tr>
        <tr>
            <td>getLevel ( node )</td>
            <td></td>
            <td>获得节点层级。</td>
            <td>Number</td>
        </tr>
        <tr>
            <td>isExpandedNode ( node )</td>
            <td></td>
            <td>是否展开节点。</td>
            <td>Boolean</td>
        </tr>
        
        <tr>
            <td>isCheckedNode ( node )</td>
            <td></td>
            <td>是否Check选中的节点。</td>
            <td>Boolean</td>
        </tr>
        <tr>
            <td>isVisibleNode ( node  )</td>
            <td></td>
            <td>是否显示节点。</td>
            <td>Boolean</td>
        </tr>
        <tr>
            <td>isEnabledNode ( node )</td>
            <td></td>
            <td>是否启用节点。</td>
            <td>Boolean</td>
        </tr>
        <tr>
            <td>bubbleParent ( node, fn, scope )</td>
            <td></td>
            <td>由当前节点开始一直上溯到根节点，调用fn，直到fn返回false为止。</td>
            <td><a href="control.html">Control</a></td>
        </tr>
        <tr>
            <td>cascadeChild ( node, fn, scope )</td>
            <td></td>
            <td>遍历所有层次的子节点, 直到返回false</td>
            <td></td>
        </tr>       
        <tr>
            <td>eachChild ( node, fn, scope )</td>
            <td></td>
            <td>遍历下一级子节点</td>
            <td></td>
        </tr>
        <tr>
            <td>removeNodes ( nodes )</td>
            <td></td>
            <td>删除多个节点</td>
            <td></td>
        </tr>
        <tr>
            <td>removeNode（node）</td>
            <td></td>
            <td>删除节点</td>
            <td></td>
        </tr>
        <tr>
            <td>addNodes ( nodes, parentNode )</td>
            <td></td>
            <td>增加多个节点</td>
            <td></td>
        </tr>
        <tr>
            <td>addNode ( node, index, parentNode )</td>
            <td></td>
            <td>加入节点</td>
            <td></td>
        </tr>
        <tr>
            <td>updateNode ( node, options )</td>
            <td></td>
            <td>更新节点内容。比如：tree.updateNode(node, {text: "abc"});</td>
            <td></td>
        </tr>
        <tr>
            <td>moveNode（node, targetNode, action）</td>
            <td></td>
            <td>移动节点。action值：before|after|add。</td>
            <td></td>
        </tr>
        <tr>
            <td>setNodeText ( node, String )</td>
            <td></td>
            <td>设置节点文本</td>
            <td></td>
        </tr>
        <tr>
            <td>setNodeIconCls ( node, String)</td>
            <td></td>
            <td>设置节点图标</td>
            <td></td>
        </tr>
<!--        <tr>
            <td>getNodeEl ( node )</td>
            <td></td>
            <td>获得节点DOM对象</td>
            <td></td>
        </tr>-->
        <tr>
            <td>getNode ( value )</td>
            <td></td>
            <td>根据值获取节点对象</td>
            <td></td>
        </tr>
<!--        <tr>
            <td>hideNode ( node )</td>
            <td></td>
            <td>隐藏节点</td>
            <td></td>
        </tr>
        <tr>
            <td>showNode ( node )</td>
            <td></td>
            <td>显示节点</td>
            <td></td>
        </tr>-->
        <tr>
            <td>enableNode ( node )</td>
            <td></td>
            <td>启用节点</td>
            <td></td>
        </tr>
        <tr>
            <td>disableNode ( node  )</td>
            <td></td>
            <td>禁用节点</td>
            <td></td>
        </tr>

        <tr>
            <td>findNodes ( fn, scope )</td>
            <td></td>
            <td>查找节点数据。如：
<pre>
var nodes = tree.findNodes(function(node){
    if(node.name.indexOf("abc") != -1) return true;
});
</pre>            
            </td>
            <td></td>
        </tr>
        <tr>
            <td>filter ( fn, scope )</td>
            <td></td>
            <td>过滤。如：
<pre>
tree.filter(function(node){
    if(node.name.indexOf("abc") != -1) return true;
});
</pre>   
            </td>
            <td></td>
        </tr>
        <tr>
            <td>clearFilter (  )</td>
            <td></td>
            <td>取消过滤</td>
            <td></td>
        </tr>

        <tr>
            <td>expandNode ( node )</td>
            <td></td>
            <td>展开节点</td>
            <td></td>
        </tr>
        <tr>
            <td>collapseNode ( node )</td>
            <td></td>
            <td>收缩节点</td>
            <td></td>
        </tr>
        <tr>
            <td>expandLevel ( Number )</td>
            <td></td>
            <td>展开层次节点</td>
            <td></td>
        </tr>
        <tr>
            <td>collapseLevel ( Number )</td>
            <td></td>
            <td>折叠层次节点</td>
            <td></td>
        </tr>
        <tr>
            <td>expandPath ( node )</td>
            <td></td>
            <td>展开节点路径</td>
            <td></td>
        </tr>
        <tr>
            <td>collapsePath ( node )</td>
            <td></td>
            <td>折叠节点路径</td>
            <td></td>
        </tr>
        
        <tr>
            <td>expandAll ( )</td>
            <td></td>
            <td>展开所有节点</td>
            <td></td>
        </tr>
        <tr>
            <td>collapseAll ( )</td>
            <td></td>
            <td>收缩所有节点</td>
            <td></td>
        </tr>
        <tr>
            <td>scrollIntoView ( node )</td>
            <td></td>
            <td>视图滚动至节点</td>
            <td></td>
        </tr>
        <tr>
            <td>selectNode ( node )</td>
            <td></td>
            <td>选中节点</td>
            <td></td>
        </tr>
        <tr>
            <td>getSelectedNode ( )</td>
            <td></td>
            <td>获取选中的节点</td>
            <td></td>
<!--        </tr>
        <tr>
            <td>setValue ( value, cascade )</td>
            <td>value: 值字符串。<br />
                cascade: 是否联动选择。默认true。传false则不联动check。
            </td>
            <td>获取选中的节点</td>
            <td></td>
        </tr>-->
        <tr>
            <td>checkNode ( node )</td>
            <td></td>
            <td>Check多选节点</td>
            <td></td>
        </tr>
        <tr>
            <td>uncheckNode ( node )</td>
            <td></td>
            <td>取消Check多选节点</td>
            <td></td>
        </tr>
        <tr>
            <td>checkNodes ( nodes )</td>
            <td></td>
            <td>Check多选多个节点</td>
            <td></td>
        </tr>
        <tr>
            <td>uncheckNodes ( nodes )</td>
            <td></td>
            <td>取消Check多选多个节点</td>
            <td></td>
        </tr>
        <tr>
            <td>checkAllNodes (  )</td>
            <td></td>
            <td>Check多选所有节点</td>
            <td></td>
        </tr>
        <tr>
            <td>uncheckAllNodes ( )</td>
            <td></td>
            <td>取消Check多选所有节点</td>
            <td></td>
        </tr>
        <tr>
            <td>getCheckedNodes ( haveParent )</td>
            <td>haveParent: Boolean。是否包含父节点。</td>
            <td>获取Check选中的多个节点</td>
            <td></td>
        </tr>
        <tr>
            <td>getValue ( haveParent)</td>
            <td>haveParent: Boolean。是否包含父节点。</td>
            <td>获取Check选中的节点值</td>
            <td></td>
        </tr>
    </table>

    <h4>Events</h4>
    <table>
        <tr><th>Name</th><th>EventObject</th><th>Description</th></tr>
        <tr>
            <td>drawnode</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean,        //是否叶子
  nodeHtml: String,       //节点html
  showCheckBox: Boolean,  //是否显示checkbox
  iconCls: String,        //图标样式
  showTreeIcon: Boolean   //是否显示图标
}
</pre>
            </td>
            <td>绘制节点时发生</td>
        </tr>
        
        <tr>
            <td>nodedblclick</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean
}
</pre>
            </td>
            <td>节点双击时发生</td>
        </tr>
        <tr>
            <td>nodeclick</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean
}
</pre>
            </td>
            <td>节点点击时发生</td>
        </tr>
        <tr>
            <td>nodemousedown</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean
}
</pre>
            </td>
            <td>节点鼠标按下时发生</td>
        </tr>
        <tr>
            <td>dragstart</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  nodes: Array,           //节点对象数组
  dragText: String,         //拖拽节点描述信息
  cancel: false
}
</pre>
            </td>
            <td>选择节点前发生</td>
        </tr>
        <tr>
            <td>beforenodeselect</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean,
  cancel: false
}
</pre>
            </td>
            <td>选择节点前发生</td>
        </tr>
        <tr>
            <td>nodeselect</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean
}
</pre>
            </td>
            <td>节点选中时发生</td>
        </tr>
        <tr>
            <td>beforeload</td>
            <td></td>
            <td>数据加载前发生</td>
        </tr>
        <tr>
            <td>preload</td>
            <td></td>
            <td>数据加载，设置到Tree前发生</td>
        </tr>
        <tr>
            <td>loaderror</td>
            <td>
<pre>
{
    sender: Object, //表格对象
    xhr: Object, //ajax对象
    errorMsg: String //错误信息
    errorCode: int  //错误码
}
</pre>              
            </td>
            <td>数据加载错误时发生</td>
        </tr>
        <tr>
            <td>load</td>
            <td>
<pre>
{
    sender: Object, //表格对象
    xhr: Object,    //ajax对象
    data: Array     //数据    
}
</pre>   
            </td>
            <td>数据加载成功时发生</td>
        </tr>
        <tr>
            <td>loadnode</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object           //节点对象 
}
</pre>
        <tr>
            <td>beforenodecheck</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean,
  checked: Boolean,       //Check状态
  cancel: false
}
</pre>
            </td>
            <td>Check选择前发生</td>
        </tr>
        <tr>
            <td>nodecheck</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object,           //节点对象
  isLeaf: Boolean
}
</pre>
            </td>
            <td>Check选择时发生</td>
        </tr>
        <tr>
            <td>beforeexpand</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object
}
</pre>
            </td>
            <td>展开节点前发生</td>
        </tr>      
        <tr>
            <td>expand</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object
}
</pre>
            </td>
            <td>展开节点后发生</td>
        </tr>      
        <tr>
            <td>beforecollapse</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object
}
</pre>
            </td>
            <td>折叠节点前发生</td>
        </tr>      
        <tr>
            <td>collapse</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  node: Object
}
</pre>
            </td>
            <td>折叠节点后发生</td>
        </tr>      
        
        <tr>
            <td>beforedrop</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  dragNode: Object,         //拖拽的节点
  dropNode: Object,         //目标投放节点
  dragAction: String,        //投放方式：add/after/before
  cancel: Boolean
}
</pre>
            </td>
            <td>拖拽投放前发生。"e.cancel = true"可取消</td>
        </tr>   
        <tr>
            <td>drop</td>
            <td>
<pre>
{
  sender: Object,         //树对象
  dragNode: Object,         //拖拽的节点
  dropNode: Object,         //目标投放节点
  dragAction: String        //投放方式：add/after/before
}
</pre>
            </td>
            <td>拖拽投放时发生</td>
        </tr>   
        <tr>
            <td>givefeedback</td>
            <td>
<pre>
{
  sender: Object,           //树对象
  from: Object,             //拖拽来源树
  node: Object,             //拖拽的节点
  targetNode: Object,       //目标投放节点
  effect: String            //投放方式：add/after/before/no。
}
</pre>
            </td>
            <td>拖拽投放前发生。用于决定是否可投放。</td>
        </tr>  
        <tr>
            <td>endedit</td>
            <td>
<pre>
{
  sender: Object,           //树对象
  node: Object             //节点对象
}
</pre>
            </td>
            <td>节点文本编辑完成时激发。</td>
        </tr>            
        
    </table>


</body>
</html>